package edu.hwadee.BEIS.entity;
// default package

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * WholeSchoolTrainingBase entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "whole_school_trainingbase", catalog = "beis")

public class WholeSchoolTrainingBase implements java.io.Serializable {

	// Fields

	private Integer wholeSchoolTrainingbaseId;
	private SchoolBasicInfor schoolBasic;
	private String wholeSchoolTrainingbaseName;
	private Integer trainingroomCount;
	private Integer trainingroomDeviceCount;
	private Integer stationCount;
	private Float usingRate;
	private Float centralFund;
	private Float provinceFund;
	private Float cityFund;
	private Float countryFund;
	private Float selfFund;
	private Float companyDonationFund;
	private Short countyAuditStatus;
	private Short cityAuditStatus;
	private Timestamp modifyTime;
	private Set<TrainingRoom> trainingRooms = new HashSet<TrainingRoom>(0);

	// Constructors

	/** default constructor */
	public WholeSchoolTrainingBase() {
	}

	/** minimal constructor */
	public WholeSchoolTrainingBase(SchoolBasicInfor schoolBasic, String wholeSchoolTrainingbaseName,
			Integer trainingroomCount, Integer trainingroomDeviceCount, Integer stationCount, Float usingRate,
			Float centralFund, Float provinceFund, Float cityFund, Float countryFund, Float selfFund,
			Float companyDonationFund, Short countyAuditStatus, Short cityAuditStatus, Timestamp modifyTime) {
		this.schoolBasic = schoolBasic;
		this.wholeSchoolTrainingbaseName = wholeSchoolTrainingbaseName;
		this.trainingroomCount = trainingroomCount;
		this.trainingroomDeviceCount = trainingroomDeviceCount;
		this.stationCount = stationCount;
		this.usingRate = usingRate;
		this.centralFund = centralFund;
		this.provinceFund = provinceFund;
		this.cityFund = cityFund;
		this.countryFund = countryFund;
		this.selfFund = selfFund;
		this.companyDonationFund = companyDonationFund;
		this.countyAuditStatus = countyAuditStatus;
		this.cityAuditStatus = cityAuditStatus;
		this.modifyTime = modifyTime;
	}

	/** full constructor */
	public WholeSchoolTrainingBase(SchoolBasicInfor schoolBasic, String wholeSchoolTrainingbaseName,
			Integer trainingroomCount, Integer trainingroomDeviceCount, Integer stationCount, Float usingRate,
			Float centralFund, Float provinceFund, Float cityFund, Float countryFund, Float selfFund,
			Float companyDonationFund, Short countyAuditStatus, Short cityAuditStatus, Timestamp modifyTime,
			Set<TrainingRoom> trainingRooms) {
		this.schoolBasic = schoolBasic;
		this.wholeSchoolTrainingbaseName = wholeSchoolTrainingbaseName;
		this.trainingroomCount = trainingroomCount;
		this.trainingroomDeviceCount = trainingroomDeviceCount;
		this.stationCount = stationCount;
		this.usingRate = usingRate;
		this.centralFund = centralFund;
		this.provinceFund = provinceFund;
		this.cityFund = cityFund;
		this.countryFund = countryFund;
		this.selfFund = selfFund;
		this.companyDonationFund = companyDonationFund;
		this.countyAuditStatus = countyAuditStatus;
		this.cityAuditStatus = cityAuditStatus;
		this.modifyTime = modifyTime;
		this.trainingRooms = trainingRooms;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "whole_school_trainingbase_id", unique = true, nullable = false)

	public Integer getWholeSchoolTrainingbaseId() {
		return this.wholeSchoolTrainingbaseId;
	}

	public void setWholeSchoolTrainingbaseId(Integer wholeSchoolTrainingbaseId) {
		this.wholeSchoolTrainingbaseId = wholeSchoolTrainingbaseId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "school_id", nullable = false)

	public SchoolBasicInfor getSchoolBasic() {
		return this.schoolBasic;
	}

	public void setSchoolBasic(SchoolBasicInfor schoolBasic) {
		this.schoolBasic = schoolBasic;
	}

	@Column(name = "whole_school_trainingbase_name", nullable = false, length = 50)

	public String getWholeSchoolTrainingbaseName() {
		return this.wholeSchoolTrainingbaseName;
	}

	public void setWholeSchoolTrainingbaseName(String wholeSchoolTrainingbaseName) {
		this.wholeSchoolTrainingbaseName = wholeSchoolTrainingbaseName;
	}

	@Column(name = "trainingroom_count", nullable = false)

	public Integer getTrainingroomCount() {
		return this.trainingroomCount;
	}

	public void setTrainingroomCount(Integer trainingroomCount) {
		this.trainingroomCount = trainingroomCount;
	}

	@Column(name = "trainingroom_device_count", nullable = false)

	public Integer getTrainingroomDeviceCount() {
		return this.trainingroomDeviceCount;
	}

	public void setTrainingroomDeviceCount(Integer trainingroomDeviceCount) {
		this.trainingroomDeviceCount = trainingroomDeviceCount;
	}

	@Column(name = "station_count", nullable = false)

	public Integer getStationCount() {
		return this.stationCount;
	}

	public void setStationCount(Integer stationCount) {
		this.stationCount = stationCount;
	}

	@Column(name = "using_rate", nullable = false, precision = 12, scale = 0)

	public Float getUsingRate() {
		return this.usingRate;
	}

	public void setUsingRate(Float usingRate) {
		this.usingRate = usingRate;
	}

	@Column(name = "central_fund", nullable = false, precision = 12, scale = 0)

	public Float getCentralFund() {
		return this.centralFund;
	}

	public void setCentralFund(Float centralFund) {
		this.centralFund = centralFund;
	}

	@Column(name = "province_fund", nullable = false, precision = 12, scale = 0)

	public Float getProvinceFund() {
		return this.provinceFund;
	}

	public void setProvinceFund(Float provinceFund) {
		this.provinceFund = provinceFund;
	}

	@Column(name = "city_fund", nullable = false, precision = 12, scale = 0)

	public Float getCityFund() {
		return this.cityFund;
	}

	public void setCityFund(Float cityFund) {
		this.cityFund = cityFund;
	}

	@Column(name = "country_fund", nullable = false, precision = 12, scale = 0)

	public Float getCountryFund() {
		return this.countryFund;
	}

	public void setCountryFund(Float countryFund) {
		this.countryFund = countryFund;
	}

	@Column(name = "self_fund", nullable = false, precision = 12, scale = 0)

	public Float getSelfFund() {
		return this.selfFund;
	}

	public void setSelfFund(Float selfFund) {
		this.selfFund = selfFund;
	}

	@Column(name = "company_donation_fund", nullable = false, precision = 12, scale = 0)

	public Float getCompanyDonationFund() {
		return this.companyDonationFund;
	}

	public void setCompanyDonationFund(Float companyDonationFund) {
		this.companyDonationFund = companyDonationFund;
	}

	@Column(name = "county_auditstatus", nullable = false)

	public Short getCountyAuditStatus() {
		return this.countyAuditStatus;
	}

	public void setCountyAuditStatus(Short countyAuditStatus) {
		this.countyAuditStatus = countyAuditStatus;
	}

	@Column(name = "city_auditstatus", nullable = false)

	public Short getCityAuditStatus() {
		return this.cityAuditStatus;
	}

	public void setCityAuditStatus(Short cityAuditStatus) {
		this.cityAuditStatus = cityAuditStatus;
	}

	@Column(name = "modify_time", nullable = false, length = 19)

	public Timestamp getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(Timestamp modifyTime) {
		this.modifyTime = modifyTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "wholeSchoolTrainingBase")

	public Set<TrainingRoom> getTrainingRooms() {
		return this.trainingRooms;
	}

	public void setTrainingRooms(Set<TrainingRoom> trainingRooms) {
		this.trainingRooms = trainingRooms;
	}

}